<template>
  <ManagePanel :menus="menus" :current-item="currentItem">
    <router-view />
  </ManagePanel>
</template>

<script setup>
import {useRoute} from "vue-router";
import {ref} from "vue";
import {FileTextOutlined, InboxOutlined, MessageOutlined} from "@ant-design/icons-vue";
import ManagePanel from "../../components/admin/ManagePanel.vue";

/**
 * Menu
 */
const menus = [
  {key:'ArticleManager', icon: 'FileTextOutlined', text: '文章管理'},
  {key:'GroupManager', icon: 'InboxOutlined', text: '分类管理'},
  // {key:'CommentManager', icon: 'MessageOutlined', text: '评论管理'},
  {key:'TrashManager', icon: 'DeleteOutlined', text: '已删除'}
]

const currentItem = ref([useRoute().name.toString()]);

console.log(currentItem)
</script>

<style scoped>
.main-box {
  padding: 20px 40px;
  min-height: calc(100vh - 64px - 80px)
}

.layout-main {
  width: 100%;
  background-color: #fff;
}

.dashboard-menu {
  height: 100%;
}
</style>